package Test.ThirdOne;
public class Person {
    private String name;
    private char sex;
    private int age;

    /**
     * 带参数构造器
     */
    Person(String name,char sex,int age){
        this.name=name;
        this.sex=sex;
        this.age=age;
    }
    /**
     * 设置Person成员变量
     */
    public void setData(String name,char sex,int age){
        this.name=name;
        this.sex=sex;
        this.age=age;
    }
    /**
     * 获取Person数据
     * @return toString()
     */
    public String getData(){
        return "姓名："+name+" 性别："+sex+" 年龄："+age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
